package top.usts.springframework.beans.factory.config;

import top.usts.springframework.beans.BeansException;
import top.usts.springframework.beans.factory.BeanFactory;

/**
 * @description:
 * @author: CJ
 * @date: 2022/2/22
 * <p>
 * * Extension of the {@link top.usts.springframework.beans.factory.BeanFactory}
 * * interface to be implemented by bean factories that are capable of
 * * autowiring, provided that they want to expose this functionality for
 * * existing bean instances.
 */
public interface AutowireCapableBeanFactory extends BeanFactory {


    /**
     * 执行 beanPostProcessors 接口实现类 postProcessBeforeInitialization 方法
     * @param existingBean
     * @param beanName
     * @return
     * @throws BeansException
     */
    Object applyBeanPostProcessorsBeforeInitialization(Object existingBean, String beanName) throws BeansException;

    /**
     * 执行 beanPostProcessors 接口实现类 postProcessAfterInitialization 方法
     * @param existingBean
     * @param beanName
     * @return
     * @throws BeansException
     */
    Object applyBeanPostProcessorsAfterInitialization(Object existingBean, String beanName) throws BeansException;


}
